package com.shunli.cterminal.model.dto;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName: OrderEtlData
 * @Description: TODO
 * @Author: DAIYALU
 * @Date: 2024/9/19
 * @Version: 1.0
 */
@Data
public class OrderEtlData {

    private Long id;

    private String eventCode;

    private String tgPar;

    private String orderNo;

    private String appCode;

    private String mallCode;

    private String projectCode;

    private String paymentMode;

    private BigDecimal receivableAmount = BigDecimal.ZERO;

    private BigDecimal actualAmount = BigDecimal.ZERO;

    private BigDecimal depositAmount = BigDecimal.ZERO;

    private BigDecimal refundAmount = BigDecimal.ZERO;

    private String uid;

    private Long customerId;

    private String customerName;

    private Long sellerId;

    private String sellerName;

    private String status;

    private String domain;

    private String adChannelCode;

    private Long adAccountId;

    private Long templateId;
    private String templateNo;
    private String templateName;

    private String phone;

    private String wxOpenId;

    private String payTime;

    private String signOnTime;

    private String shipTime;

    private String shortUrl;

    private String allocationWecomFlag;

    private Long creator;

    private String creatorName;

    private String createTime;
    /**
     * 订单分类 0-在线类 1-销售类
     */
    private String orderCategory;

    private List<SubOrderData> orderItem;


    @Data
    public static class SubOrderData{

        private Long mainOrderId;

        private String mainOrderNo;

        private Long orderId;

        private String orderNo;

        private BigDecimal orderPrice = BigDecimal.ZERO;

        private BigDecimal actualPrice = BigDecimal.ZERO;

        private BigDecimal refundAmount = BigDecimal.ZERO;

        private String creator;

        private String creatorName;

        private String createTime;

        private String status;

        private String asStatus;

        private List<OrderGoodsData> goodsItem;
    }

    @Data
    public static class OrderGoodsData{

        private Long id;

        private Long mainOrderId;

        private String mainOrderNo;

        private Long orderId;

        private String orderNo;

        private Long mallGoodsId;

        private Long goodsId;

        private String goodsName;

        private Integer number;

        private BigDecimal goodsPrice = BigDecimal.ZERO;

        private BigDecimal actualPrice = BigDecimal.ZERO;

        private BigDecimal refundAmount = BigDecimal.ZERO;

        private String shipWay;

        private String shipStatus;

        private String deliverStatus;

        private String asFlag;

        private String creator;

        private String creatorName;

        private String createTime;
    }
}
